/*
 * Copyright (c) JoinQuant Development Team
 * Author: Huayong Kuang <kuanghuayong@joinquant.com>
 */

#include <time.h>
#include <iostream>

using namespace std;

struct tm get_local_today() {
	time_t rawtime;
    struct tm now;
    struct tm today{};

    time(&rawtime);
    now = *localtime(&rawtime);

    today.tm_year = now.tm_year;
    today.tm_mon = now.tm_mon;
    today.tm_mday = now.tm_mday;

    return today;
}

int main(void)
{
    struct tm date = get_local_today();
    cout << mktime(&date) << endl;

    return 0;
}

